using System.ServiceModel;
using NBehave.Spec;
using NUnit.Framework;
using Whisper.Services;

namespace Whisper.Conversation.Subscription.Specs
{
    public class ServiceBase : SpecBase
    {
        private ServiceHost host;

        [TestFixtureSetUp]
        public override void MainSetup()
        {
            host = new ServiceHost(typeof (ConversationService));
            host.Open();
            base.MainSetup();
        }

        [TestFixtureTearDown]
        public override void MainTeardown()
        {
            host.Close();
            host = null;
            base.MainTeardown();
        }
    }
}